package user;

import book.BookList;
import operations.IOperation;

//抽象类
public abstract class User {
    protected String name;
    protected IOperation[] iOperations; //只是定义数组

    //带了名字的构造方法
    public User(String name){
        this.name = name;
    }

    //由于父类的菜单不用具体实现，所以定义成抽象方法
    public abstract int menu();

    public void doOperation(int choice, BookList bookList){
        iOperations[choice].work(bookList);
    }
}
